<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<%@ page import="com.chanyachting.emall.util.*" %>
<%@ page import="java.util.*" %>

<%@ page import="com.chanyachting.emall.domain.*" %>
<%@ page import="com.chanyachting.emall.util.RequestUtil" %>
<%@ page import="com.chanyachting.emall.service.*" %>
<%@ page import="com.chanyachting.emall.serviceImpl.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<link href="css/import.css" type="text/css" rel="stylesheet" />
<title>添加黄页关键字</title>

<%
	//获得黄页二级分类编号
	RequestUtil ru=new RequestUtil(request);

	String scid=ru.getParameter("scid","0");
	
	if(scid.equals("0")) scid=ru.getAttribute("scid","0").toString();

%>

<script type="text/javascript" src="<%=root %>/js/jquery-1.3.2.min.js" charset="utf-8">//ADCRM</script>

<script language="javascript" type="text/javascript">

	$(function(){
	
		$.ajaxSetup ({
		    cache: false //关闭AJAX相应的缓存
		});
		
	});


	function changeBusinessType(id){

		if(id!=0){

			$.get("<%=root%>/memberBackend/inc/businessCategoryList.jsp", { btypeId: id },
					  function(data){
					    $("#businessCategory").html(data);
					  });
		}
	
	}


	

</script>

</head>

<body>
<div class="tab_box">
	<div class="tab_menu">
    	<a href="#" class="current">添加黄页关键字</a>
    </div>
    <div class="tab_submenu">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%">&nbsp;</td>
          <td align="right"><strong><a href="#">预览</a><a href="#">打印</a><a href="#">导出</a></strong></td>
        </tr>
      </table>
    </div>
</div>

<div><%= new RequestUtil(request).getMsg() %></div>


<form action="<%=root %>/adminBackend/yellowpagekeyword.do?method=create" 
	method="post" enctype="multipart/form-data" name="form3" id="form3"	>

	<input type="hidden" name="subcategoryId" value="<%=scid %>" />

  <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">

    <tr>
      <td width="150" height="28" align="right">黄页二级分类名称：</td>
      <td colspan="3"><label><%=new Yellowpagesubcategory(Integer.parseInt(scid)).getName() %></label></td>
    </tr>
    
     <tr>
      <td width="200" height="28" align="right">选择黄页关键字（产品/服务）：</td>
      <td><label>
      
      <select name="businessTypeId" id="businessType" onchange="changeBusinessType(this.value);">
       <option value="0">选择行业分类</option>
        <%
        	//获得所有行业类型
        	List btypeList=Businesstype.list();
        
        	if(btypeList!=null && btypeList.size()>0){
        		
        		Businesstype btype=null;
        		
        		for(int i=0;i<btypeList.size();i++){
        			
        			btype=(Businesstype)btypeList.get(i);
        %>
        	<option value="<%=btype.getId() %>"><%=btype.getName() %></option>
        <%
        			
        		}
        	}
        
        %>
      </select>
      <td id="businessCategory">
      	<select>
      		<option>选择行业次分类</option>
      	</select>
      </td>
      
      <td id="productCategory">
      	<select>
      		<option>选择主营产品/服务</option>
      	</select>
      </td>
      
      </label></td>
    </tr>
  
    
  </table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="td_updown">
    <tr>
      <td height="40" align="center">
      	<input type="submit" name="button" id="button" value="提交" />
        <input type="reset"  name="button" id="button2" value="取消" /></td>
    </tr>
  </table>
</form>
</body>
</html>

